﻿using System;
using System.Collections.Generic;
using System.IO;
using Kinban.Contracts;

namespace Kinban.Users
{
    public class DemoUserGateway : IUserGateway
    {
        public List<User> GetUsers()
        {
            var result = new List<User>();
            for (int i = 1; i < 8; i++)
            {
                User user = CreateUser(i);
                result.Add(user);
            }
            return result;
        }

        private User CreateUser(int i)
        {
            string userPart = string.Format("simpson{0}", i);
            string pictureFileName = string.Format("simpson{0}.png", i);
            return new User()
                       {
                           NetworkId = userPart,
                           TfsName = userPart,
                           PictureUrl = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "images", pictureFileName)
                       };
        }
    }
}
